﻿Namespace Sigortali.IsKazasi
	Module Functions

		Function BildirimRaporu(ByVal Process As Token, ByVal sno As String) As Recordset
			Q("select a.repsube,a.dosyano,a.dosyaacik,a.iskbiltar,a.oltar,a.olsaat,a.ismah,a.olsekli,a.isbasisaat,a.onay,a.odememe,a.hastalik,a.histbastar as bastar,a.histsontar as bittar,a.isyerino,b.isyeriadi")
			Q("from ssd.dbo.siskgenel a left join ssd.dbo.isyerigenel b on a.isyerino = b.isyerino")
			Q("where a.sno = :sno order by a.dosyano")
			Return Process.OpenSQL("*", sno)
		End Function

		Function IstirahatRaporu(ByVal Process As Token, ByVal sno As String) As Recordset
			Q("select repsube,dosyano,hasdurum,histbastar as bastar,histsontar as bittar,isvhode,ssdhode,ssdhodegun")
			Q("from ssd.dbo.siskrapor where sno = :sno order by dosyano")
			Return Process.OpenSQL("*", sno)
		End Function

		Function OdemeRaporu(ByVal Process As Token, ByVal sno As String) As Recordset
			Q("select repsube,dosyano,ssdhodeno,fisno,pek,pogs,ssdhodebastar as bastar,ssdhodesontar as bittar,ssdhodemik,ssdhodegun")
			Q("from ssd.dbo.siskodeme where sno = :sno order by dosyano,bastar")
			Return Process.OpenSQL("*", sno)
		End Function

	End Module
End Namespace
